import { DominionId } from "../../../../Message/Public/DominionId";
import { ConstConfig } from "../../resource/ConstConfig";
type int = number;
//class DomWarInfo
    
    export  class DomWarInfo
    {
        

        public get isMain(): Boolean
        {
            return this._isMain;
        }

        public set isMain(arg1: Boolean)
        {
            this._isMain = arg1;
            return;
        }

        public get isMaxNum(): Boolean
        {
            var loc1=this.getMaxNum();
            return this._peopleNum >= loc1;
        }

        public get peopleNum(): int
        {
            return this._peopleNum;
        }

        public set peopleNum(arg1: int)
        {
            this._peopleNum = arg1;
            return;
        }

        public get dominionId(): DominionId
        {
            return this._dominionId;
        }

        public set dominionId(arg1: DominionId)
        {
            this._dominionId = arg1;
            return;
        }

        public getMaxNum(): int
        {
            var loc1=0;
            var loc2=ConstConfig.instance.getObjectByName("DominionPlayerNumLimit");
            if (this._isMain) 
            {
                loc1 = loc2.constValue;
            }
            else 
            {
                loc1 = loc2.constValueEx;
            }
            return loc1;
        }

        /* internal */ /* var */_dominionId: DominionId;

        /* internal */ /* var */_peopleNum: int;

        /* internal */ /* var */_isMain: Boolean=false;
    }
